//
//  weatherTableViewController.m
//  SmileWeather
//
//  Created by 申浩光 on 15/9/30.
//  Copyright (c) 2015年 陶天海. All rights reserved.
//

#import "weatherTableViewController.h"
#import "CenterViewController.h"
@interface weatherTableViewController ()

@end

@implementation weatherTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
         self.tableView.layer.borderWidth = 1;
    self.tableView.layer.borderColor =[UIColor blackColor].CGColor;
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell3"];
       //self.block();
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
#warning Potentially incomplete method implementation.
    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
#warning Incomplete method implementation.
  
    return [self.mod.info[@"night"] count];
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell3" forIndexPath:indexPath];
  
    NSMutableArray *weather1 = [[NSMutableArray alloc] init];
       weather1 = self.mod.info[@"day"];
     cell.textLabel.text = weather1[indexPath.row];
   
     NSString *sting = [[weatherHandle shareWetherHandle]getWeather:@"等级" andIndex:indexPath.row];

    NSString *str = [NSString stringWithFormat:@"%@:%@",sting,cell.textLabel.text];

    cell.textLabel.text = str;
    cell.textLabel.textColor = [UIColor whiteColor];
       cell.backgroundColor = [UIColor clearColor];
     cell.textLabel.font = [UIFont fontWithName:@"ArialRoundedMTBold" size:18];
    tableView.backgroundColor = [UIColor clearColor];
    tableView.showsVerticalScrollIndicator = NO;
    tableView.backgroundColor = [UIColor clearColor];

    tableView.separatorStyle = NO;
    BlurImageView *blur = [[BlurImageView alloc]initWithFrame:CGRectMake(0, 0, tableView.frame.size.width,tableView.frame.size.height)];
    tableView.backgroundView = blur;
    return cell;
}

- (void)weather{
    NSLog(@"%ld",self.weatherArr.count);
}
- (void)viewWillAppear:(BOOL)animated{
 
}


/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
}
*/

/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Delete the row from the data source
        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }   
}
*/

/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
